#!/bin/basj
#安装oniguruma
tar xf oniguruma-6.9.4.tar.gz
cd oniguruma-6.9.4/
./autogen.sh
./configure --prefix=/usr --libdir=/lib64
make && make install

#安装php
tar zxf ~/php-7.4.11.tar.gz
cd php-7.4.11/
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/httpd/bin/apxs --with-config-file-path=/usr/local/php/etc  --with-pdo-mysql=mysqlnd --with-mysqli=mysqlnd  --enable-gd --with-iconv-dir --with-zlib-dir --with-bz2 --with-openssl --enable-soap  --enable-mbstring --enable-sockets --enable-exif --with-jpeg --with-freetype --enable-mysqlnd --enable-bcmath  --with-libdir=lib64  --with-ldap --with-gettext
make && make install
#创建/usr/local/php/etc
mkdir /usr/local/php/etc
cp -rf ~/php.ini /usr/local/php/etc/
cp -rf ~/httpd.conf /usr/local/httpd/conf/
/usr/local/httpd/bin/apachectl graceful
cp -rf ~/index.php /usr/local/httpd/htdocs/
cp -rf ~/dba.php /usr/local/httpd/htdocs/
